﻿using System;
using System.Data;
using TatThanhJsc.Database;
using TatThanhJsc.TSql;
using TatThanhJsc.Website;
using TatThanhJsc.Website.Cookie;
using TatThanhJsc.Website.Keyword;
public partial class _Default : System.Web.UI.Page
{
    protected string lang = CookieProcess.GetLanguageValueDisplay();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }

    private void LoadData()
    {
        string condition = DataTransfer.AndConditon(
            GroupsTSql.GetGroupsByVgapp(CodeApplications.News),
            GroupsTSql.GetGroupsByVglang(lang),
            GroupsTSql.GetGroupsByIgenable("1"),
            ItemsTSql.GetItemsByIienable("1")
            );
        DataTable dt = new DataTable();
        dt = GroupsItems.GetAllData("4", "*", condition, "");
        
        rptList.DataSource = dt;
        rptList.DataBind();
    }
}